package router

import (
	"github.com/beherochuling/beesoft_api/app/api/apps"
	"github.com/beherochuling/beesoft_api/app/api/apps/util"
	"github.com/gogf/gf/v2/net/ghttp"
)

func Apps(group *ghttp.RouterGroup) {
	group.Group("/util", Util)
	group.Group("/network", Network)
}
func Util(group *ghttp.RouterGroup) {
	group.Group("/datetime", func(group *ghttp.RouterGroup) { // 日历
		group.GET("/now", util.Datetime.Now)
		//group.GET("/date", util.Datetime.Now)
		group.GET("/periods", util.Datetime.Period)
	})
	group.Group("/convert", func(group *ghttp.RouterGroup) { // 内容转换
		//group.GET("/", util.Convert.Convert)
	})
}
func Network(group *ghttp.RouterGroup) {
	group.Group("/nodes", func(group *ghttp.RouterGroup) { // 节点
		group.GET("/", apps.Node.List)
	})
	group.Group("/links", func(group *ghttp.RouterGroup) { // 连线
		group.GET("/", apps.Link.List)
	})
}

func AppsBackend(group *ghttp.RouterGroup) {
	group.Group("/network", Network)
}
